import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {GoodsAddComponent} from './goods-add/goods-add.component';
import {AddComponent} from './goods-add/add/add.component';
import {GoodsManageComponent} from './goods-manage/goods-manage.component';
import {OrderManageComponent} from './order-manage/order-manage.component';
import {DeliveryManageComponent} from './delivery-manage/delivery-manage.component';
import {DeliveryAddComponent} from './delivery-manage/delivery-add/delivery-add.component';
import {DeliveryEditComponent} from './delivery-manage/delivery-edit/delivery-edit.component';
import {EditComponent} from './goods-add/edit/edit.component';
import {SuccessComponent} from './goods-add/success/success.component';
import {TemplateComponent} from './temp-manage/temp-manage.component';

export const routes: Routes = [
  {
    path: 'goods-add',
    component: GoodsAddComponent,
    children: []
  },
  {
    path: 'goods-add/add',
    component: AddComponent,
    children: []
  },
  {
    path: 'goods-add/success',
    component: SuccessComponent,
    children: []
  },
  {
    path: 'goods-manage/edit/:id',
    component: EditComponent,
    children: []
  },
  {
    path: 'goods-manage',
    component: GoodsManageComponent,
    children: []
  },
  {
    path: 'order-manage',
    component: OrderManageComponent,
    children: []
  },
  {
    path: 'delivery-manage',
    component: DeliveryManageComponent,
    children: []
  },
  {
    path: 'delivery-manage/delivery-add',
    component: DeliveryAddComponent,
    children: []
  },
  {
    path: 'delivery-manage/delivery-edit/:id',
    component: DeliveryEditComponent,
    children: []
  },
  {
    path: 'temp-manage',
    component: TemplateComponent,
    children: []
  }
];

export const routing: ModuleWithProviders = RouterModule.forChild(routes);
